package lagou.mode3.mode4;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class ClientSide{

    public static void main(String[] args) {
        PrintStream ps = null;
        BufferedReader br = null;
        BufferedOutputStream bo=null;
        Socket socket;
        try {
            socket = new Socket("127.0.0.1", 8888);
            ps = new PrintStream(socket.getOutputStream());
            br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            bo = new BufferedOutputStream(socket.getOutputStream());

            ClientInput clientInput = new ClientInput(br);
            ClientOutput clientOutput = new ClientOutput(ps,bo);

            clientInput.start();
            clientOutput.start();

        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
